package com.example.oasystem.service.impl;






import com.example.oasystem.dao.plan.AoaPlanListDaoOfJian;
import com.example.oasystem.entity.plan.AoaPlanListOfJian;
import com.example.oasystem.service.AoaPlanListServiceOfJian;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AoaPlanListServiceImplOfJian implements AoaPlanListServiceOfJian {
    @Autowired
    private AoaPlanListDaoOfJian aoaPlanListDaoOfJian;
    @Override
    public PageInfo<AoaPlanListOfJian> selectUserNameAndPlanList(String startime, String endtime, int pageNum, int pagesize, String baseKey, Long userId, Long typeId) {
        PageHelper.startPage(pageNum,pagesize);
        List<AoaPlanListOfJian> list = aoaPlanListDaoOfJian.selectAllAndUserName(startime,endtime,baseKey,userId,typeId);
        PageInfo<AoaPlanListOfJian> pagePlans = new PageInfo<AoaPlanListOfJian>(list);
        return pagePlans;
    }
}
